Add Xote and Xote SSR templates#124
Conversation
commit: |
15afa23 to
d77ce90
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d77ce901e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "res:clean": "rescript clean", | ||
| "res:dev": "rescript -w", | ||
| "dev": "node server.mjs", | ||
| "start": "NODE_ENV=production node server.mjs", |
There was a problem hiding this comment.
Use a cross-platform start script for SSR template
The start script uses POSIX-only env-var syntax (NODE_ENV=production ...), which fails in Windows shells (cmd/PowerShell), so npm run start is broken for Windows users of the new SSR template. Because this is the documented production entrypoint, the template should set production mode in a cross-platform way (for example via cross-env or server-side defaulting) so the command works across supported OSes.
Useful? React with 👍 / 👎.
| }, | ||
| "devDependencies": { | ||
| "@tailwindcss/vite": "^4.0.0", | ||
| "rescript": "^12.0.0-beta.1", |
There was a problem hiding this comment.
Regenerate lockfiles to match template manifests
This lockfile still includes rescript in the root devDependencies even though the corresponding template package.json omits it, and the same mismatch exists in templates/rescript-template-xote-ssr/package-lock.json. That inconsistency can break npm ci (which requires lockfile/package.json parity) and also defeats the intended behavior of deferring the ReScript version choice to the scaffolder. Rebuild these lockfiles from the current package.json files so top-level deps are synchronized.
Useful? React with 👍 / 👎.
|
Can you
? Thank you for this, it's super nice. I especially like how minimalist the CSR template is. |
Summary
rescript-template-xote— Xote with Vite, rescript-signals and Tailwind 4 (CSR)rescript-template-xote-ssr— Xote with Vite, rescript-signals and Tailwind 4 (SSR via Node server)--template xoteand--template xote-ssrresolve directly to each variant for non-interactive use.namefields aligned to the folder name,res:*scripts ordered first inpackage.json,_gitignore(renamed to.gitignoreon copy), andrescriptleft out of devDeps so CRA installs the user-selected version.Test plan
npm testpassesnpm create rescript-app@latest my-app -- --template xotescaffolds andnpm run devworksnpm create rescript-app@latest my-app -- --template xote-ssrscaffolds andnpm run devworks